package com.ruoyi.dispatch.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dispatch.mapper.CoalWashTypeMapper;
import com.ruoyi.dispatch.domain.CoalWashType;
import com.ruoyi.dispatch.service.ICoalWashTypeService;

/**
 * 洗煤煤种配置Service业务层处理
 * 
 * @author wuxiaofang
 * @date 2025-04-10
 */
@Service
public class CoalWashTypeServiceImpl implements ICoalWashTypeService 
{
    @Autowired
    private CoalWashTypeMapper coalWashTypeMapper;

    /**
     * 查询洗煤煤种配置
     * 
     * @param typeId 洗煤煤种配置主键
     * @return 洗煤煤种配置
     */
    @Override
    public CoalWashType selectCoalWashTypeByTypeId(Long typeId)
    {
        return coalWashTypeMapper.selectCoalWashTypeByTypeId(typeId);
    }

    /**
     * 查询洗煤煤种配置列表
     * 
     * @param coalWashType 洗煤煤种配置
     * @return 洗煤煤种配置
     */
    @Override
    public List<CoalWashType> selectCoalWashTypeList(CoalWashType coalWashType)
    {
        return coalWashTypeMapper.selectCoalWashTypeList(coalWashType);
    }

    /**
     * 新增洗煤煤种配置
     * 
     * @param coalWashType 洗煤煤种配置
     * @return 结果
     */
    @Override
    public int insertCoalWashType(CoalWashType coalWashType)
    {
        coalWashType.setCreateTime(DateUtils.getNowDate());
        return coalWashTypeMapper.insertCoalWashType(coalWashType);
    }

    /**
     * 修改洗煤煤种配置
     * 
     * @param coalWashType 洗煤煤种配置
     * @return 结果
     */
    @Override
    public int updateCoalWashType(CoalWashType coalWashType)
    {
        coalWashType.setUpdateTime(DateUtils.getNowDate());
        return coalWashTypeMapper.updateCoalWashType(coalWashType);
    }

    /**
     * 批量删除洗煤煤种配置
     * 
     * @param typeIds 需要删除的洗煤煤种配置主键
     * @return 结果
     */
    @Override
    public int deleteCoalWashTypeByTypeIds(Long[] typeIds)
    {
        return coalWashTypeMapper.deleteCoalWashTypeByTypeIds(typeIds);
    }

    /**
     * 删除洗煤煤种配置信息
     * 
     * @param typeId 洗煤煤种配置主键
     * @return 结果
     */
    @Override
    public int deleteCoalWashTypeByTypeId(Long typeId)
    {
        return coalWashTypeMapper.deleteCoalWashTypeByTypeId(typeId);
    }
}
